import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
import AllRoute from "./routes/allroutes";
import ErrorPage from "./errors/error-page";
import {
    createBrowserRouter,
    RouterProvider,
} from "react-router-dom";
import "./styles.css";

const router = createBrowserRouter([
    {
        path: "/",
        element: <App/>,
        errorElement: <ErrorPage/>,
        children: AllRoute
    },
]);

ReactDOM.createRoot(document.getElementById("root")).render(
    <React.StrictMode>
        <RouterProvider router={router}/>
    </React.StrictMode>
);
